package com.pengshun.modules.api.transport.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pengshun.modules.api.coal.util.CommonUtil;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;


@Data
public class TransportOrderDetil {


    private Long transportTakeOrderId;
    private Long merchantId;
    private String remark;
    private String merchantName;
    private String shipProvince;
    //发货人姓名
    private String shipName;
    private String shipCity;
    private String shipDistrict;
    private Double shipLngx;
    private Double shipLaty;
    private String shipPhone;
    private String shipDetailAddress;
    private String receiveProvince;
    private String receiveCity;
    private String receiveDistrict;
    private Double receiveLngx;
    private Double receiveLaty;
    private String receiveDetailAddress;
    private String receiveName;
    private String receivePhone;

    private BigDecimal number;
    private BigDecimal totalNumber;
    private BigDecimal freight;
    private BigDecimal infoFee;
    private BigDecimal loadFee;
    private BigDecimal unloadFee;
    private BigDecimal poundsFee;
    private BigDecimal otherFee;
    private BigDecimal mineSendNum;
    private BigDecimal realNum;
    private BigDecimal settlementAmount;
    private String transportTakeNo;
    private String gatheringUserName;
    private String gatheringUserPhone;
    private String merchantAddress;
    private Double merchantLongitude;
    private Double merchantLatitude;
    private String carOwnerNum;
    private String name;
    private String phone;
    //车辆类型
    private String vehicleTypeName;
    private String endAddress;
    private String startAddress;
    private String carLoad;
    private String coalName;
    private Integer needCar;
    private Integer userType;
    private Integer joinMouthTime;
    private Integer loadCarTime;
    private Integer lowWeight;
    private Integer status;
    private Integer oilProportion;
    private String isContract;
    private String shippingCompany;
    private String receiveCompany;
    private BigDecimal allowDiff;
    private Integer cashProportion;
    private String vehicleLengthName;
    private String carNumber;
    private String carPhoto;
    private String typeName;
    private String userName;
    private Double distance;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date takeTime;
    private Long gatheringUserId;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date transportDate;
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private Date transportStartTime;
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private Date transportEndTime;

    private String district;

    public String getDistrict() {
        distance = CommonUtil.GetDistance(shipLaty, shipLngx, receiveLaty, receiveLngx);
        return distance+"";
    }


}
